package com.wgf.controller;

import jakarta.annotation.Resource;
import org.springframework.ai.chat.model.ChatModel;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Flux;

/**
 * 测试先不使用ToolCalling
 */
@RestController
public class NoToolCallingController
{
    @Resource
    private ChatModel chatModel;

    //http://localhost:6013/notoolcall/chat
    @GetMapping("/notoolcall/chat")
    public Flux<String> chat(@RequestParam(name = "msg",defaultValue = "你是谁，现在几点了") String msg)
    {
        return chatModel.stream(msg);
    }
}